package com.leyi.inception.api.enums;

public enum ExecuteModelEnum {

    CHECK(0, "/*--user={0};--password={1};--host={2};--port={3};--check=1;--backup={4};*/inception_magic_start;use {5};{6};inception_magic_commit;"),//检查模式
    EXECUTE(1, "/*--user={0};--password={1};--host={2};--port={3};--execute=1;--backup={4};*/inception_magic_start;use {5};{6};inception_magic_commit;"),//执行模式
    ;


    private Integer key;

    private String value;

    ExecuteModelEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static ExecuteModelEnum getByKey(Integer key) {
        for (ExecuteModelEnum codeEnum : values()) {
            if (key.equals(codeEnum.getKey())) {
                return codeEnum;
            }
        }
        return null;
    }

}
